package com.sanjiahantang.youjiarole.module.me.require.views.impl;

import android.view.View;
import android.widget.ListView;
import android.widget.TextView;

import com.sanjiahantang.youjiarole.R;
import com.sanjiahantang.youjiarole.base.BaseMvpActivity;
import com.sanjiahantang.youjiarole.module.me.require.presenters.RequirePresenter;
import com.sanjiahantang.youjiarole.module.me.require.views.RequireView;

/**
 * Created by zy on 2017/10/24.
 */

public class RequireListActivity extends BaseMvpActivity<RequireView,RequirePresenter> implements RequireView, View.OnClickListener {


    private ListView listView;

    @Override
    public void showProgress() {
        super.showProgress($this);
    }

    @Override
    public RequirePresenter initPresenter() {
        return new RequirePresenter();
    }

    @Override
    public void initView() {
        setContentView(R.layout.activity_common_list);
        listView = (ListView) findViewById(R.id.listView);
        presenter.bindList($this,listView);
        TextView title = (TextView) findViewById(R.id.title);
        title.setText("我的需求");
        findViewById(R.id.fl_Left).setOnClickListener(this);
    }

    @Override
    public void initData() {
        presenter.loadRequireList($this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.fl_Left:
                finish();
                break;
        }
    }
}
